package xyz.lilei123.test;

import org.junit.Test;
import xyz.lilei23.framework.core.ApplicationContext;
import xyz.lilei23.framework.core.ClassPathXmlApplicationContext;

/**
 * @ClassName Application
 * @Author lilei
 * @Date 29/07/2021 07:14
 * @Version 1.0
 **/
public class Application {

    @Test
    public void Test(){
        ApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("beans.xml");
        TransferService transferService = classPathXmlApplicationContext.getBean(TransferService.class);
        String fromCardNo = "6029621011001";
        String toCardNo = "6029621011000";
        int moneyStr = 200;
        try {
            transferService.transfer(fromCardNo, toCardNo, moneyStr);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
